import 'package:flutter/material.dart';
import 'package:flutter_live/views/login/login_form.dart';


class Login extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: Text('登录'),
        elevation: 0,
      ),
      body: GestureDetector(
        behavior: HitTestBehavior.translucent,
        onTap: () {
          // 触摸收起键盘
          FocusScope.of(context).requestFocus(FocusNode());
        },
        child: Container(
          child: Column(
            children: <Widget>[
              Container(
                padding: const EdgeInsets.all(50.0),
                child: new LoginForm(),
              ),
              Text('-----其他方式登录------'),

              Container(
                child: new OtherChannel(),
              )
            ],
          ),
        ),
      ),
    );
  }

}

class OtherChannel extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceAround,
      children: <Widget>[
        Column(
          children: <Widget>[
            IconButton(
              icon: Image.asset(
                "assets/images/qq.png",
              ),
              iconSize: 50,
              onPressed: null,
            ),
            Text('QQ登录')
          ],
        ),
        Column(
          children: <Widget>[
            IconButton(
              icon: Image.asset(
                "assets/images/wechat.png",
              ),
              iconSize: 50,
              onPressed: null,
            ),
            Text('微信登录')
          ],
        ),
        Column(
          children: <Widget>[
            IconButton(
              icon: Image.asset(
                "assets/images/weibo.png",
              ),
              iconSize: 50,
              onPressed: null,
            ),
            Text('微博登录')
          ],
        )
      ],
    );
  }
}




